from libs.exception import BaseHTTPException
from flask_babel import gettext as _

class HProdCategoryParamError(BaseHTTPException):
    error_code = "category_param_error"
    code = 400
    def __init__(self,message:str|None):
        message = message or ""
        self.description = _("Product category parameter error.{message}").format(message=message)
        super().__init__(self.description)

class HProdCategoryNotFoundError(BaseHTTPException):
    error_code = "category_notfound_error"
    code = 400
    def __init__(self,category_id:str|None):
        category_id = category_id or ""
        self.description = _("Product category not found error.{message}").format(message=category_id)
        super().__init__(self.description)